home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_06_(08-1984).d64
/
snake escape joy
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
4KB
|
135 lines
5 GOTO100
10 POKE54296,15:POKE54277,17:POKE54278,17
15 POKE54276,17:POKE54273,28:POKE54272,49
20 POKE54276,0:POKE54273,0:POKE54272,0
30 RETURN
100 SO=0:SR=3
110 GOSUB30000:GOSUB29000
120 PRINT"[147]"
130 GOSUB28000:GOSUB8000:GOSUB9000:GOSUB28000
140 TI$="000000"
150 CL=INT(RND(1)*7)+1:IFCL=5ORCL=3THEN150
160 IFTI$=L$THENGOSUB7000:GOTO130
170 IFDH=0THENPOKEB,HC
180 POKEB,HC:POKECO,CL
190 K=PEEK(56321)AND15
200 IFK=11THENDR=-1:GOTO250:REM LEFT
210 IFK=7THENDR=1:GOTO250:REM RIGHT
220 IFK=14THENDR=-40:GOTO250:REM UP
230 IFK=13THENDR=40:GOTO250:REM DOWN
240 GOTO160
250 POKEB,BC:B=B+DR:CO=CO+DR:SO=SO+1
260 IFPEEK(B)=88THENDH=0:GOTO9500
270 IFPEEK(B)=160THENGOSUB5000:GOTO120
280 IFPEEK(B)=81THENGOTO9500
300 IFB<1024ORB>2023THENB=B-DR:CO=CO-DR
310 GOSUB10:GOTO150
4000 REM PRINT INSTRUCTIONS
4010 PRINT"[147]YOUR GOAL IS TO MOVE THE SNAKE OUT OF THE POISON PATCH."
4020 PRINT" TRY TO AVOID ALL POISON ([144][216][159])."
4040 PRINT"[144]PUSH JOYSTICK IN DIRECTION YOU WISH TO MOVE"
4050 PRINT"POINT VALUES:"
4060 PRINT"BODY SEGMENT=1[146] POINT"
4070 PRINT"YOU WILL RECEIVE A BONUS FOR ESCAPING."
4080 PRINT"[156]HIT A KEY TO START "
4090 GETA$:IFA$=""THEN4090
4100 RETURN
5000 VB=0:POKE53280,3:POKE53281,1
5010 IFS=1THENVB=20
5020 IFS=2THENVB=30
5030 IFS=3THENVB=40
5035 IFS=4THENVB=50
5040 BN=FNSC(VB)
5050 PRINT"[147]YOU HAVE ESCAPED!!!"
5060 SO=SO+BN
5070 PRINT"BONUS[146]:"BN"[146]"
5080 PRINT"[156]SCORE[146]:"SO
5090 PRINT""SR"SNAKES REMAINING"
5100 POKE54296,15:POKE54277,83:POKE54278,50
5102 FORH=33TO57STEP2:LO=INT(RND(0)*50)+180
5103 POKE54276,17:FORJ=1TO60:NEXTJ:POKE54273,HI:POKE54272,LO:NEXT
5106 FORT=1TO200:NEXT:POKE54276,0:POKE54273,0:POKE54272,0
5120 DH=2:RETURN
6000 PRINT"[147][214][214][214][214][214][214][214][214][214][214][214][214][214]"
6003 PRINT"[214][159][146][214]
6005 [153]"(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)
6010 PRINT"[144]GAME"
6020 POKE54296,15:POKE54277,53:POKE54278,69
6021 POKE54276,33:POKE54273,3:POKE272,244
6022 FORT=1TO900:NEXT:POKE54276,0:POKE54273,0:POKE54272,0
6025 POKE36874,150:PRINT"[144] OVER "
6026 POKE54296,15:POKE54277,53:POKE54278,69
6027 POKE54276,33:POKE54273,2:POKE54272,163
6028 FORT=1TO900:NEXT:POKE54276,0:POKE54273,0:POKE54272,0
6040 PRINT"PLAY AGAIN?"
6050 GETP$:IFP$=""THEN6050
6060 IFP$="Y"THENSO=0:SR=3:LK=0:GOTO120
6070 IFP$<>"N"THEN6050
6080 PRINT"BYE!":END
7000 SR=SR-1:POKE53280,3:POKE53281,1
7010 PRINT"[147]WHEW! YOU HAVE JUST DIED OF EXHAUSTION!"
7020 PRINTSPC(14)"[218][156]SCORE[146]:"SO
7030 PRINTSPC(9)""SR"SNAKES REMAINING"
7040 POKE54296,10:POKE54277,31:POKE54278,17
7042 POKE54276,33:POKE54273,5:POKE54272,71
7043 FORV0=15TO5STEP-.5:POKE54296,V0:FORT=1TO100:NEXT:NEXT
7045 POKE54276,0:POKE54273,0:POKE54272,0:POKE54296,0
7050 FORT=1TO2000:NEXT
7060 IFSR=0THEN6000
7070 RETURN
8000 POKE53280,4:POKE53281,1:PRINT"[147]"SPC(42)"CHOOSE YOUR SKILL:"
8005 PRINT" [129][154][160][163]"
8010 PRINTSPC(51)"LEVEL 1=60 SECONDS"
8020 PRINTSPC(51)"LEVEL 2=45 SECONDS"
8030 PRINTSPC(51)"LEVEL 3=30 SECONDS"
8040 PRINTSPC(51)"[156]LEVEL 4=15 SECONDS"
8045 PRINT"[158]LEV[156]E[159]L?"
8050 GETS$:IFS$=""THEN8050
8060 S=VAL(S$)
8070 IFS=1THENL$="000100":RETURN
8080 IFS=2THENL$="000045":RETURN
8090 IFS=3THENL$="000030":RETURN
8100 IFS=4THENL$="000015":RETURN
8110 GOTO8050
9000 POKE53280,4:POKE53281,8:PRINT"[147]"
9010 FORF=1TO150:D=INT(RND(1)*966)+1058
9020 POKED,88:POKED+54272,1:FORJ=1TO20:NEXTJ:POKED+54272,0:NEXTF
9030 POKE2023,160:POKE2022,160:POKE1983,160:POKE1982,160
9040 POKE56295,6:POKE56294,6:POKE56255,6:POKE56254,6
9050 POKE1943,32:POKE2021,32
9060 RETURN
9500 POKE54296,33:POKE54273,5:POKE54272,71
9505 POKE54276,33:POKE54273,5:POKE54272,71
9510 FORT=1TO900:NEXT:POKE54276,0:POKE54273,0:POKE54272,0
9515 POKE54296,15:POKE54277,53:POKE54278,69
9520 POKE54276,33:POKE54273,3:POKE54272,244
9525 FORT=1TO900:NEXT:POKE54276,0:POKE54273,0:POKE54272,0
9530 POKE54296,15:POKE54277,53:POKE54278,69
9533 POKE54276,33:POKE54273,2:POKE54272,163
9536 FORT=1TO900:NEXT:POKE54276,0:POKE54273,0:POKE54272,0
9540 SR=SR-1
9550 PRINT""SPC(18)""SPC(37)"RIP"SPC(37)""SPC(37)"[146]"
9560 FORT=1TO1000:NEXT
9570 POKE53280,3:POKE53281,1:PRINT"[147]"
9580 PRINTSPC(14)"TOO BAD!!"
9590 PRINT"SCORE[146]:[156]"SO"[146]"
9600 PRINTSPC(8)""SR"SNAKES REMAINING"
9610 FORT=1TO1000:NEXT:IFSR=0THEN6000
9620 GOTO120
10000 POKEV,15:POKES3,217:PZOZS3,217:POKEV,0:POKES3,0:RETURN
28000 BC=81:HC=87:B=1024:S3=36876:CO=55296:LK=0:RETURN
29000 DEFFNA(L)=INT(RND(1)*L)+1064
29010 DEFFNSC(L)=INT(RND(1)*L)+5:RETURN
30000 POKE53280,3:POKE53281,1
30010 PRINT"[147] "
30020 PRINT" "
30030 PRINT" SNAKE ESCAPE! "
30040 PRINT" "
30050 PRINT" "
30070 PRINT"INSTRUCTIONS?"
30080 GETI$:IFI$=""THEN30080
30090 IFI$="Y"THENGOSUB4000:GOTO30120
30100 IFI$="N"THEN30120
30110 GOTO30080
30120 RETURN